package com.xuanwu.core;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.xuanwu.service.DataService;
import com.xuanwu.service.impl.DataServiceImpl;
import com.xuanwu.utils.JsonUtil;
import com.xuanwu.utils.SqlUtil;

public class App {

	public static void main(String[] args) {
//		File file = new File(CoreParam.COMMON_SQL_NAME);
//		file.getAbsolutePath();
		// System.out.println(App.class.getClassLoader().getResource("").getPath());获取路径
		ApplicationContext app = new ClassPathXmlApplicationContext("spring.xml");
		DataService dataService = app.getBean(DataServiceImpl.class);
		//System.out.println(JsonUtil.getJson(dataService.queryData("com_t_workflow")));
		System.out.println(SqlUtil.assembleScript(dataService.queryData("com_t_workflow"), "com_t_workflow"));
	}
}
